<div ng-controller="ProcessesController as render"   style="width: 100%;height: 100%">
    <h1 class="md-title">Processes</h1>
    <md-card-content>
        <div layout="row">
            <md-input-container class="md-block" flex-gt-sm>

                <label>Frequency</label>
                <md-select ng-model="vars.interval" ng-change="setInterval()" >
                    <md-option ng-repeat="interval in [-1, 0.2 , 0.5, 1, 5, 10, 20, 30]" ng-value="interval">
                        {{interval == -1 ? ('Refresh is disabled') : interval  +' '+'sec'}}
                    </md-option>
                </md-select>
            </md-input-container>


            <md-input-container class="md-block" flex-gt-sm>
                <md-switch class="md-primary" name="special" ng-model="vars.readOnlyRows">
                    Select/Read only
                </md-switch>
            </md-input-container>
            <md-input-container class="md-block" flex-gt-sm>
                <md-switch class="md-primary" name="special" ng-model="vars.logMode">
                    Log Mode
                </md-switch>
            </md-input-container>

            <md-input-container class="md-block" flex-gt-sm>
                <md-switch class="md-primary" name="special" ng-model="vars.clusterMode">
                    Cluster
                </md-switch>
            </md-input-container>


            <md-input-container class="md-block" flex-gt-sm ng-click="load()">
                <md-button class="md-raised md-primary">Refresh</md-button>
            </md-input-container>

            <md-input-container class="md-block" flex-gt-sm ng-click="flush()">
                <md-button class="md-raised">Reset</md-button>
            </md-input-container>

            <md-input-container class="md-block" flex-gt-sm ng-click="dialogKill()">
                <md-button class="md-raised md-warn">KILL Query</md-button>
            </md-input-container>

        </div>

    </md-card-content>


    <div class="row" flex>
        <div class="row">
            <div class="col-md-12">

                <div class="WidgetsListResult">
                    <div gridstack class="grid-stack grid1" options="gridStackOptions" staticGrid="staticGrid">



                        <div gridstack-item ng-repeat="w in widgets" class="grid-stack-item WidgetsListItem"
                             gs-item-x="w.x" gs-item-y="w.y"
                             gs-item-width="w.sizeX" gs-item-height="w.sizeY" >

                            <div class="widget-grid-stack grid-stack-item-content ">
                                <draw-widget
                                        widget="w" ng-if="w.init && !w.error"
                                        isdark="vars.isDark" class="widget widget-grid-stack-item widget-{{w.type}} widget-selector" events="events">
                                </draw-widget>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>

</div>
